<%@ page import="Model.MySportBean" %>
<%@ page import="Model.MySport" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: 吴倩
  Date: 2022/12/4
  Time: 16:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:useBean id="mysportBean" class="Model.MySportBean" scope="session"/>
<html>
<head><%--
  Created by IntelliJ IDEA.
  User: 吴倩
  Date: 2022/12/3
  Time: 1:48
  To change this template use File | Settings | File Templates.
--%>
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
        <% application.setAttribute("path",request.getContextPath());%>
    <html>
    <head>
        <title>运动员主页</title>
        <link rel="stylesheet" href="../css/index.css" type="text/css">
    </head>
        <%
    String name = (String) session.getAttribute("name");
%>
<style>
    .button{
        border-radius: 10px;
        margin:0;
        border:none;
        width:100px;
        background-repeat:no-repeat;
        background-color: #19aa8d;
        height:30px;
        padding-top:0;
    }
</style>
<body>
<div>

    <div class="head">
        <div class="headOne">
            <p id="system">运动会管理系统</p>
        </div>

        <div class="headThree">
            <div class="info" style="margin-top: 10px">

            </div>

            <div class="manager">
                <div id="manager_one">
                    <img src="../image2/管理员.png" alt="图片加载失败" width="30px">
                </div>
                <div id="manager_two">
                    <div style="font-size: 20px;color:white;"><%=name%></div>
                </div>
            </div>

            <div class="quit">
                <a class="quit" href="../jsp/login.jsp">☛退 出 登 录</a>
            </div>
        </div>
    </div>
    <div class="body_one">
        <div class="function1">
            🚀功能菜单
        </div>
        <div class="operating">
            <img src="../image/搜索.png" alt="加载失败" width="25px">&nbsp;&nbsp;<span><a href="../SporterLookSport">查看运动项目</a></span><br><br>
            <img src="../image/替换.png" alt="加载失败">&nbsp;&nbsp;&nbsp;<span><a href="signUp.jsp">报名</a></span><br><br>
            <br>
            <br>
            <img src="../image/搜索.png" alt="加载失败" width="25px">&nbsp;&nbsp;<span><a href="../MySport">我参加的运动项目</a></span><br><br>
            <img src="../image2/比例.png" alt="加载失败">&nbsp;<span><a href="../CheckGrade">查询成绩</a></span><br><br>
        </div>
    </div>
    <div class="body_two">
        <div class="body_head">
            <div class="home">
                <a href="sporter_index.jsp"><img src="../image/主页.png" alt="图片加载失败！"></a>
            </div>
            <div class="drop">
                <img src="../image2/下拉条.png" alt="图片加载失败！">
            </div>
        </div>

        <div class="body_tail" >
            <div align="center" style="color: dodgerblue;font-size: 40px;margin-top: 10px">
                我参加的比赛
            </div>

            <form action="../DelMySport" method="get">
                <table class="table table-hover" style="width: 1100px;margin-top: 30px;font-size: 20px" align="center">
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>名称</th>
                        <th>时间</th>
                        <th>地点</th>
                        <th>选择</th>
                    </tr>
                    </thead>
                    <tbody align="center">
                    <%
                        MySportBean db=(MySportBean) session.getAttribute("mysportBean");
                        ArrayList<MySport> d;
                        d = db.getMySports();

                        for(int i=0;i<d.size();i++){
                            out.print("<tr>");
                            out.print("<td>"+d.get(i).getSno()+"</td>");
                            out.print("<td>"+d.get(i).getSname()+"</td>");
                            out.print("<td>"+d.get(i).getStime()+"</td>");
                            out.print("<td>"+d.get(i).getSplace()+"</td>");
                            out.print("<td><input type="+"checkbox name="+"del value="+d.get(i).getSno()+"></td>");
                            out.print("</tr>");
                        }
                    %>
                    </tbody>
                </table>
                <input type="submit" name="ok" value="删除" class="button" style="margin-left: 55px;margin-top: 15px">
            </form>
        </div>
    </div>
</div>
</body>
</body>
</html>

